#ifndef BODY_H
#define BODY_H
#include "../../common/Common.h"
#include "Aabb.h"
class Body {
public:
	Body();
	~Body();
	virtual Point* getPosition() {
		return position;
	}

	virtual void setPosition(Point position) {
		this->position->from(position);
	}

	virtual Point* getVelocity() {
		return this->velocity;
	}

	virtual void setVelocity(Point currentVelocity) {
		this->velocity->from(currentVelocity);
	}

	virtual float getAngle() {
		return angle;
	}

	virtual float getAngleVelocity() {
		return this->angleVelocity;
	}

	virtual void setAngleVelocity(float angleVelocity) {
		this->angleVelocity = angleVelocity;
	}

	virtual void setAngle(double angle) {
		this->angle = angle;
	}


	virtual void setMass(float mass) {
		this->mass = mass;
	}

	virtual float getMass() {
		return mass;
	}

	virtual void setId(int id) {
		this->id = id;
	}

	virtual int getId() {
		return this->id;
	}
	virtual void calcAabb() {}

	virtual Aabb* getAabb() {
		return this->aabb;
	}
	void setData(void* dataptr) {
		data = dataptr;
	}

	void* getData() {
		return data;
	}

protected:
	Point* position = new Point(0.0f, 0.0f);
	Point* velocity = new Point(0.0f, 0.0f);
	double angle = 0;
	float angleVelocity = 0;
	Aabb* aabb = new Aabb();
	float mass = 0;
	int id = 0;
	void* data = nullptr;

};

#endif // !BODY_H

